Several Navigation Services functions return
AEDesc
structures describing objects from the network or the file system. You must not assume that an
AEDesc
structure is of any particular type. If your application requires a particular type of
AEDesc
structure, you should attempt to coerce the structure using the Apple Event Manager function
AECoerceDesc
. For more information on coercing Apple event descriptors, see
Inside Macintosh: Interapplication Communication
.
When Navigation Services passes you an
AEDesc
structure of type
'typeCString'
, the structure describes a network object by using a Uniform Resource Locator (URL). Network objects can be AppleTalk zones, AppleShare servers, or (in Navigation Services 2.0 or later) other network services like FTP or HTTP. For example, an AppleTalk zone called "Building 1 - 3rd floor" would be represented by a URL of
'at://Building 1 - 3rd floor'
. An AppleShare server called "Mac Software" in the same zone would be represented by a URL of
'afp:/at/Mac Software:Building 1 - 3rd floor'
.
If Navigation Services passes you an
AEDesc
structure of descriptor type
'typeFSS'
describing a directory, the directory's file specification contains an empty
name
field and its
parID
field contains the directory ID. If an
AEDesc
structure of type
'typeFSS'
describes a file, its file specification's
name
field contains the filename and its
parID
field contains the directory ID of the file's parent directory. This means you can use the
name
field to determine whether an object is a file or a folder.
If you need to determine the ID
of a directory's parent directory, use the File Manager function
PBGetCatInfo
, described in
Inside Macintosh: Files
.